package com.sky.wsp.nacos.client.controller;

import com.sky.wsp.nacos.client.config.RedisProperties;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class IndexController {

    @Resource
    private RedisProperties redisProperties;

    @GetMapping
    @RequestMapping("/")
    public String index() {
        return "从Nacos配置中心获取redis地址: " + redisProperties.getHost() + ":" + redisProperties.getPort();
    }

    @GetMapping
    @RequestMapping("/user")
    public String user() {
        return "用户中心";
    }
}